﻿<%@ Page Language="C#" Theme="PAT_Theme" MasterPageFile="~/master/PAT.master" AutoEventWireup="true"  CodeFile="PatGrupoCatalogoEdit.aspx.cs" Inherits="PatGrupoCatalogoEdit" Title="PatGrupoCatalogo Edit" %>

<asp:Content ID="Content2" ContentPlaceHolderID="subHeaderContent" Runat="Server">Pat Grupo Catalogo - Agregar/Editar</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="Server">
		<data:MultiFormView ID="FormView1" DataKeyNames="IdGrupoCatalogo" runat="server" DataSourceID="PatGrupoCatalogoDataSource">
		
			<EditItemTemplatePaths>
				<data:TemplatePath Path="usercontrols/PatGrupoCatalogoFields.ascx" />
			</EditItemTemplatePaths>
		
			<InsertItemTemplatePaths>
				<data:TemplatePath Path="usercontrols/PatGrupoCatalogoFields.ascx" />
			</InsertItemTemplatePaths>
		
			<EmptyDataTemplate>
				<b>PatGrupoCatalogo not found!</b>
			</EmptyDataTemplate>
			
			<FooterTemplate>
				<asp:Button ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Crear" />
				<asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Actualizar" />
				<asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancelar" />
			</FooterTemplate>

		</data:MultiFormView>
		
		<data:PatGrupoCatalogoDataSource ID="PatGrupoCatalogoDataSource" runat="server"
			SelectMethod="GetByIdGrupoCatalogo"
		>
			<Parameters>
				<asp:QueryStringParameter Name="IdGrupoCatalogo" QueryStringField="IdGrupoCatalogo" Type="String" />

			</Parameters>
		</data:PatGrupoCatalogoDataSource>
		
		<br />

		<data:EntityGridView ID="GridViewPatKit1" runat="server"
			AutoGenerateColumns="False"	
			OnSelectedIndexChanged="GridViewPatKit1_SelectedIndexChanged"			 			 
			DataSourceID="PatKitDataSource1"
			DataKeyNames="IdKit"
			AllowMultiColumnSorting="false"
			DefaultSortColumnName="" 
			DefaultSortDirection="Ascending"	
			ExcelExportFileName="Export_PatKit.xls"  		
			Visible='<%# (FormView1.DefaultMode == FormViewMode.Insert) ? false : true %>'	
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" />
				<asp:BoundField DataField="DescripcionKit" HeaderText="Descripcion Kit" SortExpression="[DESCRIPCION_KIT]" />				
				<data:HyperLinkField HeaderText="Id Grupo Catalogo" DataNavigateUrlFormatString="PatGrupoCatalogoEdit.aspx?IdGrupoCatalogo={0}" DataNavigateUrlFields="IdGrupoCatalogo" DataContainer="IdGrupoCatalogoSource" DataTextField="DescripcionGrupoCatalogo" />
				<data:HyperLinkField HeaderText="Id Lista Precios" DataNavigateUrlFormatString="PatListaPreciosTallerEdit.aspx?IdListaPrecios={0}" DataNavigateUrlFields="IdListaPrecios" DataContainer="IdListaPreciosSource" DataTextField="DescripcionListaPrecios" />
				<asp:BoundField DataField="Activo" HeaderText="Activo" SortExpression="[ACTIVO]" />				
			</Columns>
			<EmptyDataTemplate>
				<b>No Pat Kit Found! </b>
				<asp:HyperLink runat="server" ID="hypPatKit" NavigateUrl="~/admin/PatKitEdit.aspx">Agregar Nuevo </asp:HyperLink>
			</EmptyDataTemplate>
		</data:EntityGridView>					
		
		<data:PatKitDataSource ID="PatKitDataSource1" runat="server" SelectMethod="Find"
			EnableDeepLoad="True"
			>
			<DeepLoadProperties Method="IncludeChildren" Recursive="False">
	            <Types>
					<data:PatKitProperty Name="PatGrupoCatalogo"/> 
					<data:PatKitProperty Name="PatListaPreciosTaller"/> 
					<%--<data:PatKitProperty Name="IdItemInventarioPatItemInventarioCollection_From_PatKitItem" />--%>
					<%--<data:PatKitProperty Name="PatKitOperacionCollection" />--%>
					<%--<data:PatKitProperty Name="PatKitItemCollection" />--%>
					<%--<data:PatKitProperty Name="PatOrdenTrabajoKitCollection" />--%>
					<%--<data:PatKitProperty Name="PatCitaTallerCollection" />--%>
					<%--<data:PatKitProperty Name="PatMantenimientoProgramadoCollection" />--%>
					<%--<data:PatKitProperty Name="IdGrupoCatalogoPatGrupoCatalogoCollection_From_PatMantenimientoProgramado" />--%>
					<%--<data:PatKitProperty Name="IdDocumentoNumeroOrdenPatOrdenTrabajoCollection_From_PatOrdenTrabajoKit" />--%>
					<%--<data:PatKitProperty Name="IdOperacionPatTemparioCollection_From_PatKitOperacion" />--%>
				</Types>
			</DeepLoadProperties>
			
		    <Parameters>
				<data:SqlParameter Name="Parameters">
					<Filters>
						<data:PatKitFilter  Column="IdGrupoCatalogo" QueryStringField="IdGrupoCatalogo" /> 
					</Filters>
				</data:SqlParameter>
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" /> 
		    </Parameters>
		</data:PatKitDataSource>		
		
		<br />
		<data:EntityGridView ID="GridViewPatCatalogoVehiculo2" runat="server"
			AutoGenerateColumns="False"	
			OnSelectedIndexChanged="GridViewPatCatalogoVehiculo2_SelectedIndexChanged"			 			 
			DataSourceID="PatCatalogoVehiculoDataSource2"
			DataKeyNames="IdCatalogo"
			AllowMultiColumnSorting="false"
			DefaultSortColumnName="" 
			DefaultSortDirection="Ascending"	
			ExcelExportFileName="Export_PatCatalogoVehiculo.xls"  		
			Visible='<%# (FormView1.DefaultMode == FormViewMode.Insert) ? false : true %>'	
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" />
				<asp:BoundField DataField="CodigoInternoCatalogo" HeaderText="Codigo Interno Catalogo" SortExpression="[CODIGO_INTERNO_CATALOGO]" />				
				<asp:BoundField DataField="DescripcionCatalogo" HeaderText="Descripcion Catalogo" SortExpression="[DESCRIPCION_CATALOGO]" />				
				<asp:BoundField DataField="Cilindraje" HeaderText="Cilindraje" SortExpression="[CILINDRAJE]" />				
				<data:HyperLinkField HeaderText="Id Marca Vehiculo" DataNavigateUrlFormatString="PatMarcaVehiculoEdit.aspx?IdMarcaVehiculo={0}" DataNavigateUrlFields="IdMarcaVehiculo" DataContainer="IdMarcaVehiculoSource" DataTextField="DescripcionMarcaVehiculo" />
				<data:HyperLinkField HeaderText="Id Tipo Servicio" DataNavigateUrlFormatString="PatTipoServicioEdit.aspx?IdTipoServicio={0}" DataNavigateUrlFields="IdTipoServicio" DataContainer="IdTipoServicioSource" DataTextField="DescripcionTipoServicio" />
				<data:HyperLinkField HeaderText="Id Clase Vehiculo" DataNavigateUrlFormatString="PatClaseVehiculoEdit.aspx?IdClaseVehiculo={0}" DataNavigateUrlFields="IdClaseVehiculo" DataContainer="IdClaseVehiculoSource" DataTextField="DescripcionClaseVehiculo" />
				<asp:BoundField DataField="CapacidadPasajeros" HeaderText="Capacidad Pasajeros" SortExpression="[CAPACIDAD_PASAJEROS]" />				
				<asp:BoundField DataField="CapacidadCarga" HeaderText="Capacidad Carga" SortExpression="[CAPACIDAD_CARGA]" />				
				<asp:BoundField DataField="NumeroPuertas" HeaderText="Numero Puertas" SortExpression="[NUMERO_PUERTAS]" />				
				<asp:BoundField DataField="CodigoTransito" HeaderText="Codigo Transito" SortExpression="[CODIGO_TRANSITO]" />				
				<asp:BoundField DataField="PorcentajeIva" HeaderText="Porcentaje Iva" SortExpression="[PORCENTAJE_IVA]" />				
				<data:HyperLinkField HeaderText="Id Gama Vehiculo" DataNavigateUrlFormatString="PatGamaVehiculoEdit.aspx?IdGamaVehiculo={0}" DataNavigateUrlFields="IdGamaVehiculo" DataContainer="IdGamaVehiculoSource" DataTextField="DescripcionGamaVehiculo" />
				<data:HyperLinkField HeaderText="Id Grupo Catalogo" DataNavigateUrlFormatString="PatGrupoCatalogoEdit.aspx?IdGrupoCatalogo={0}" DataNavigateUrlFields="IdGrupoCatalogo" DataContainer="IdGrupoCatalogoSource" DataTextField="DescripcionGrupoCatalogo" />
				<asp:BoundField DataField="VinBasico" HeaderText="Vin Basico" SortExpression="[VIN_BASICO]" />				
				<asp:BoundField DataField="Activo" HeaderText="Activo" SortExpression="[ACTIVO]" />				
				<data:HyperLinkField HeaderText="Id Tipo Combustible" DataNavigateUrlFormatString="PatTipoCombustibleEdit.aspx?IdTipoCombustible={0}" DataNavigateUrlFields="IdTipoCombustible" DataContainer="IdTipoCombustibleSource" DataTextField="DescripcionTipoCombustible" />
			</Columns>
			<EmptyDataTemplate>
				<b>No Pat Catalogo Vehiculo Found! </b>
				<asp:HyperLink runat="server" ID="hypPatCatalogoVehiculo" NavigateUrl="~/admin/PatCatalogoVehiculoEdit.aspx">Agregar Nuevo </asp:HyperLink>
			</EmptyDataTemplate>
		</data:EntityGridView>					
		
		<data:PatCatalogoVehiculoDataSource ID="PatCatalogoVehiculoDataSource2" runat="server" SelectMethod="Find"
			EnableDeepLoad="True"
			>
			<DeepLoadProperties Method="IncludeChildren" Recursive="False">
	            <Types>
					<data:PatCatalogoVehiculoProperty Name="PatClaseVehiculo"/> 
					<data:PatCatalogoVehiculoProperty Name="PatGamaVehiculo"/> 
					<data:PatCatalogoVehiculoProperty Name="PatGrupoCatalogo"/> 
					<data:PatCatalogoVehiculoProperty Name="PatMarcaVehiculo"/> 
					<data:PatCatalogoVehiculoProperty Name="PatTipoCombustible"/> 
					<data:PatCatalogoVehiculoProperty Name="PatTipoServicio"/> 
					<%--<data:PatCatalogoVehiculoProperty Name="IdItemInventarioPatItemInventarioCollection_From_PatItemCatalogo" />--%>
					<%--<data:PatCatalogoVehiculoProperty Name="PatCitaTallerCollection" />--%>
					<%--<data:PatCatalogoVehiculoProperty Name="PatItemCatalogoCollection" />--%>
					<%--<data:PatCatalogoVehiculoProperty Name="PatVehiculoCollection" />--%>
				</Types>
			</DeepLoadProperties>
			
		    <Parameters>
				<data:SqlParameter Name="Parameters">
					<Filters>
						<data:PatCatalogoVehiculoFilter  Column="IdGrupoCatalogo" QueryStringField="IdGrupoCatalogo" /> 
					</Filters>
				</data:SqlParameter>
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" /> 
		    </Parameters>
		</data:PatCatalogoVehiculoDataSource>		
		
		<br />
		

</asp:Content>

